package errdefs

// ErrNotFound 表示请求的对象不存在
// ErrNotFound signals that the requested object doesn't exist
type ErrNotFound interface {
	NotFund()
}

// ErrInvalidParameter 用户输入无效的信号
// ErrInvalidParameter signals that the user input is invalid
type ErrInvalidParameter interface {
	InvalidParameter()
}

// ErrConflict 表示某些内部状态与请求的操作冲突，无法执行。状态更改应该能够清除此错误
// ErrConflict signals that some internal state conflicts with the requested action and can't be performed.A change in state should be able to clear this error
type ErrConflict interface {
	Conflict()
}

// ErrUnauthorized 用于表示用户无权执行特定操作
// ErrUnauthorized is used to signify that the user is not authorized to perform a specific action
type ErrUnauthorized interface {
	Unauthorized()
}

// ErrForbidden 表示在任何情况下都无法执行所请求的操作。当返回一个errforidden时，调用者不应该重试该操作。
// ErrForbidden signals that the requested action cannot be performed under any circumstances. When a ErrForbidden is returned,the caller should never retry the action.
type ErrForbidden interface {
	Forbidden()
}

// ErrSystem 发生了一些内部错误的信号。例如挂载请求失败。
// ErrSystem signals that some internal error occurred.An example of this would be a failed mount request.
type ErrSystem interface {
	System()
}

// ErrNotModified 表示无法执行操作，因为该操作已处于所需状态
// ErrNotModified signals that an action can't be performed because it's already in the desired state
type ErrNotModified interface {
	NotModified()
}

// ErrNotImplemented 表示请求的操作/功能未按配置在系统上实现。
// ErrNotImplemented signals that the requested action/feature is not implemented on the system as configured.
type ErrNotImplemented interface {
	NotImplemented()
}

// ErrCancelled 表示操作已取消。
// ErrCancelled signals that the action was cancelled.
type ErrCancelled interface {
	Cancelled()
}

// ErrDeadline 表示在操作完成之前已到达截止日期
// ErrDeadline signals that the deadline was reached before the action completed
type ErrDeadline interface {
	DeadlineExceeded()
}

// ErrDataLoss 表示数据丢失或数据损坏
// ErrDataLoss indicates that data was lost or there is data corruption
type ErrDataLoss interface {
	DataLoss()
}

// ErrUnknown 发生的错误类型未知的信号。
// ErrUnknown signals that the kind of error that occurred is not known.
type ErrUnknown interface {
	Unknown()
}
